import { getPlanByMId } from '@/api/plan'
const state = {
  planList: [{}]
}
const getters = {

}
const mutations = {
  GETPLANLIST (state, planList) {
    // 将获取到的数据赋值给state中的planList
    console.log(planList)
    state.planList = planList
  }
}
const actions = {
  async getPlanByMId ({ commit }, data) {
    const result = await getPlanByMId(data.mId, data.time)
    commit('GETPLANLIST', result.data)
  }
}
export default ({
  namespaced: true,
  state,
  getters,
  mutations,
  actions
})
